home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
DIVTEST.TAS
< prev
next >
Wrap
Text File
|
1991-04-13
|
5KB
|
189 lines
{
DIVTEST.TAS PROC PROFIT TEST SCRIPT EXAMPLE
This script was written by Frank Wolynski in April 1991.
It 'encodes' various indicator relationships into a very
nicely formatted, extremely condense presentation.
To run this script, you must set your SYMBOL TABLE SIZE to
15000 or so in the TAS CONFIGURATION SCREEN.
}
{ #SCAN_DATE '910401' } {Remove brackets & set date for back test}
#MAX_QUOTES 150 {Increase this # to amount going back}
#OUTPUT_FILE 'DIVTEST.LST' {Set file name to date for ease }
ob_ar : ARRAY;
ad_ar : ARRAY;
PR100 : ARRAY;
PR26 : ARRAY;
PR12 : ARRAY;
Troc : ARRAY;
if quote_count < 102 then
return;
PR12 := ROC(C,12,'%');
PR26 := ROC(C,26,'%');
YPR26 := p[-1];
Troc := ADD(PR12,PR26);
PR100 := MOV(ROC(C,12,'%'),100,'S');
m1troc := mov(Troc,10,'S');
ym1troc := p[-1];
m5troc := mov(Troc,50,'S');
d_clo := c - c[-1];
S_A := STOCH(5,3);
YS_A := p[-1];
SL_A := STOCH(20,5);
YSL_A := p[-1];
avg_vol := cum(V)/quote_count;
ob_ar := obv(); {obv calcs}
mob_ar := mov(ob_ar,50,'s'); {MA of obv}
ad_ar := ad(); {Accum/Dist Calcs}
mad_ar := mov(ad_ar,50,'s');
ma5 := mov(c,50,'s');
ma2 := mov(c,20,'s');
ma1 := mov(c,10,'s');
ma0 := c[0];
if first_ticker then
begin
writeln('---------------------------------------------------------------------------')
writeln('Stochastics Studies < 20 Triggers P = PRoc Reversal')
writeln('Script File = DIVTEST1.TAS V = Vol > Avg Vol')
writeln('(+-) = 10maTroc Brk above or below 50maTroc O = Obv > 50 MA')
writeln(' - By the Security = (5,3) Reversal A = Acc/Dist > 50 MA')
writeln(' * - By the Security = (20,5) Reversal * = 100MA of 12 PRoc > 0')
writeln('** - By the Security = Dual Stoch Lows + = 10maTroc > 50maTroc')
writeln('---------------------------------------------------------------------------')
writeln('Security\t\t\tTClose\tChange Sto 12R 26R 100T 50T MAPos Flags')
writeln('---------------------------------------------------------------------------')
end
trigger := 0;
if ((YS_A <= 20 OR S_A <= 20) AND (S_A > YS_A)) then
begin
trigger := 1;
sto := S_A;
end;
if ((YSL_A <= 20 OR SL_A <= 20) AND (SL_A > YSL_A)) then
begin
trigger := 2;
sto := SL_A;
end
if (S_A <= 20 AND SL_A <= 20) THEN
begin
trigger := 3;
sto := S_A;
end
if ((m1troc > m5troc) AND (ym1troc <= m5troc)) then
begin
trigger := 4;
sto := S_A;
end
if ((m1troc < m5troc) AND (ym1troc >= m5troc)) then
begin
trigger := 5;
sto := S_A;
end
IF (trigger >= 1 AND trigger <=5) then
begin
if trigger = 1 then
write(' ');
if trigger = 2 then
write('* ');
if trigger = 3 then
write('**');
if trigger = 4 then
write('+ ');
if trigger = 5 then
write('- ');
write(fullname,c,d_clo,INT(sto),' ',INT(PR12[0]),INT(PR26[0]),
INT(PR100[0]),INT(m5troc),'\t');
value := 1;
if (ma5 < ma2 and ma2 < ma1 and ma1 < ma0) then
begin
write('5210 ')
value := 0;
end
if (ma5 < ma1 and ma1 < ma2 and ma2 < ma0) then
begin
write('5120 ')
value := 0;
end
if (ma5 < ma2 and ma2 < ma0 and ma0 < ma1) then
begin
write('5201 ')
value := 0;
end
if (ma5 < ma0 and ma0 < ma2 and ma2 < ma1) then
begin
write('5021 ')
value := 0;
end
if (ma5 < ma0 and ma0 < ma1 and ma1 < ma2) then
begin
write('5012 ')
value := 0;
end
if (ma5 < ma1 and ma1 < ma0 and ma0 < ma2) then
begin
write('5102 ')
value := 0;
end
if (ma0 < ma5 and ma5 < ma1 and ma1 < ma2) then
begin
write('0512 ')
value := 0;
end
if (ma0 < ma1 and ma1 < ma5 and ma5 < ma2) then
begin
write('0152 ')
value := 0;
end
if (ma2 < ma5 and ma5 < ma1 and ma1 < ma0) then
begin
write('2510 ')
value := 0;
end
if (ma2 < ma5 and ma5 < ma0 and ma0 < ma1) then
begin
write('2501 ')
value := 0;
end
if (ma2 < ma1 and ma1 < ma5 and ma5 < ma0) then
begin
write('2150 ')
value := 0;
end
if (ma2 < ma1 and ma1 < ma0 and ma0 < ma5) then
begin
write('2105 ')
value := 0;
end
if (ma1 < ma2 and ma2 < ma0 and ma0 < ma5) then
begin
write('1205 ')
value := 0;
end
if (ma1 < ma0 and ma0 < ma2 and ma2 < ma5) then
begin
write('1025 ')
value := 0;
end
if (ma0 < ma1 and ma1 < ma2 and ma2 < ma5) then
begin
write('0125 ')
value := 0;
end
if value = 1 then
write('.... ');
if (PR26 > YPR26) then
write('P')
if (v > avg_vol) then
write('V')
if (ob_ar > mob_ar) then
write('O')
if (ad_ar > mad_ar) then
write('A')
if (pr100 > 0) then
write('*')
if (m1troc > m5troc) then
write('+')
writeln(' ')
end